package config

import (
	"github.com/BurntSushi/toml"
)

type Config struct {
	Service Service
}

type Service struct {
	Addr string
	Port int
}

var GlobalConfig = &Config{}

func MustParse(path string) {
	if _, err := toml.DecodeFile(path, GlobalConfig); err != nil {
		panic(err)
	}
}
